<template>
	<view class="warp">
		<navigator url="/pages/mine/server" hover-class='none' class="contact-customer">
			<image src="/static/contact_customer.png"></image>
		</navigator>
		<view class="pageImg">
			<image src="https://wapstatic.xtqtech.com/o_1ca7bvohipb6jb71nnu1pd119q4q.png" class="playBg"></image>
			<image src="https://wapstatic.xtqtech.com/o_1ca7bvohi1plbd9jodmvo911evp.png" class="bg"></image>
			<button open-type="getUserInfo" :disabled="btnDisabled" form-type='submit' bindgetuserinfo="scanCode"
				class="scanBtnClass"></button>
			<image src="https://wapstatic.xtqtech.com/o_1ca7bvohi119o8bh12ia1kvqsneo.png" class="scanCode" bindtap="scanCode">
			</image>
		</view>
		<tabbar :currentTab='0' :type="0" :scroll="scroll" ref="child" @scrollTop="scrollTop" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				scrollLeft: 0, //滑动距离
				scroll: 0,
				user_id: null,
				optionsUrl: null,
				btnDisabled: false,
				scanBtnClass: 'clickStart'
			}
		},
		onLoad(options) {
			var self = this;
			var optionsUrl = decodeURIComponent(options.q);
			this.optionsUrl = optionsUrl

			// app.getUserInfo(function(loginInfo) { // 调用登录接口
			// 	if (loginInfo) {
			// 		var user_id = loginInfo.user_id;
			// 		self.setData({
			// 			user_id: user_id,
			// 			scanBtnClass: 'scanCode'
			// 		})
			// 		self.goToUrl(optionsUrl, true);
			// 	}
			// })
		},
	}
</script>

<style scoped lang="scss">
	page {
		background: #ffecd1;
		height: 100%;
		box-sizing: border-box;
	}

	.warp {
		height: 100%;
		position: relative;
		box-sizing: border-box;
		overflow: hidden;
	}

	.warp .playBg {
		width: 682rpx;
		height: 587rpx;
		position: absolute;
		top: 44rpx;
		left: 32rpx;
	}

	.warp .bg {
		position: absolute;
		left: 0;
		bottom: -96rpx;
		width: 750rpx;
		height: 488rpx;
	}

	.scanCode,
	.clickStart {
		position: absolute;
		width: 378rpx;
		height: 378rpx;
		left: 184rpx;
		bottom: 150rpx;
		border-radius: 50%;
		box-shadow: 0 14px 20px 0 rgba(247, 222, 183, 1);
	}

	.scanCode {
		background: url('https://wapstatic.xtqtech.com/o_1ca7bvohi119o8bh12ia1kvqsneo.png') no-repeat center center;
		background-size: 100% 100%;
	}

	.clickStart {
		background: url('https://wapstatic.xtqtech.com/click_start.png') no-repeat center center;
		background-size: 100% 100%;
	}

	.contact-customer {
		width: 200rpx;
		height: 64rpx;
		position: fixed;
		top: 140rpx;
		left: 24rpx;
		z-index: 100;
	}

	.contact-customer image {
		width: 100%;
		height: 100%;
	}

	@-webkit-keyframes fadeOut {
		0% {
			opacity: 1;
		}

		50% {
			opacity: 1;
		}

		100% {
			opacity: 0;
		}
	}

	@keyframes fadeOut {
		0% {
			opacity: 1;
		}

		50% {
			opacity: 1;
		}

		100% {
			opacity: 0;
		}
	}
</style>